This invention generally relates to computing systems, more particularly to three-dimensional computer graphics, and most particularly to structure and method for a pipelined three-dimensional graphics processor implementing the saving and retrieving of graphics pipeline state information.
Computer graphics is the art and science of generating pictures with a computer. Generation of pictures, or images, is commonly called rendering. Generally, in three-dimensional (3D) computer graphics, geometry that represents surfaces (or volumes) of objects in a scene is translated into pixels stored in a frame buffer, and then displayed on a display device. Real-time display devices, such as CRTs used as computer monitors, refresh the display by continuously displaying the image over and over.
In a 3D animation, a sequence of images is displayed, giving the illusion of motion in three-dimensional space. Interactive 3D computer graphics allows a user to change his viewpoint or change the geometry in real-time, thereby requiring the rendering system to create new images on-the-fly in real-time.
In 3D computer graphics, each renderable object generally has its own local object coordinate system, and therefore needs to be translated (or transformed) from object coordinates to pixel display coordinates, and this is shown diagrammatically in FIG. 1. Conceptually, this is a 4-step process: 1) transformation (including scaling for size enlargement or shrink) from object coordinates to world coordinates, which is the coordinate system for the entire scene; 2) transformation from world coordinates to eye coordinates, based on the viewing point of the scene; 3) transformation from eye coordinates to perspective translated coordinates, where perspective scaling (farther objects appear smaller) has been performed; and 4) transformation from perspective translated coordinates to pixel coordinates. These transformation steps can be compressed into one or two steps by precomputing appropriate transformation matrices before any transformation occurs. Once the geometry is in screen coordinates, it is broken into a set of pixel color values (that is xe2x80x9crasterizedxe2x80x9d) that are stored into the frame buffer.
Many techniques are used for generating pixel color values, including Gouraud shading, Phong shading, and texture mapping. After color values are determined, pixels are stored or displayed. In the absence of z-buffering or alpha blending, the last pixel color written to a position is the visible pixel. This means that the order in which rendering takes place affects the final image. Z-buffering causes the last pixel to be written only if it is spatially xe2x80x9cin frontxe2x80x9d of all other pixels in a position. This is one form of hidden surface removal.
For a typical computer system, the display screen refers to a window within the computer""s display (composed of one or more CRTs). But, for typical game applications, the display screen is typically the entire display.
A summary of the prior art rendering process can be found in: xe2x80x9cFundamentals of Three-dimensional Computer Graphicsxe2x80x9d, by Watt, Chapter 5: The Rendering Process, pages 97 to 113, published by Addison-Wesley Publishing Company, Reading, Mass. 1989, reprinted 1991, ISBN 0-201-15442-0.
Many hardware renderers have been developed, and an example is incorporated herein by reference: xe2x80x9cLeo: A System for Cost Effective 3D Shaded Graphicsxe2x80x9d, by Deering and Nelson, pages 101 to 108 of SIGGRAPH93 Proceedings, Aug. 1-6, 1993, Computer Graphics Proceedings, Annual Conference Series, published by ACM SIGGRAPH, New York, 1993, Softcover ISBN 0-201-58889-7 and CD-ROM ISBN 0-201-56997-3 (hereinafter referred to as the Deering Reference). The Deering Reference includes a diagram of a generic 3D graphics pipeline (i.e., a renderer, or a rendering system) that it describes as xe2x80x9ctruly generic, as at the top level nearly every commercial 3D graphics accelerator fits this abstractionxe2x80x9d, and this pipeline diagram is reproduced here as FIG. 2. Such pipeline diagrams convey the process of rendering, but do not describe any particular hardware. Prior art pipelined architectures render according to the order objects are received. This limits them from producing some images efficiently.